package client

import (
	"awesomeTask/application/variable"
	event2 "awesomeTask/system/event"
)

/**
监控连接节点如果出现断开连接此处进行重新连接
*/
func MonitorConnection() {
	event2.Register(variable.ON_LOSE_CONNECTION, func(args ...interface{}) {
		ip := args[0].(string)
		port := args[1].(int)
		CreateNewClient(ip, port)
	})
}
